import { createWebHistory, createRouter } from 'vue-router'
import Home from "../views/Home.vue"
import Login from "../views/Login.vue"
import Register from "../views/Register.vue"

//配置路径关系
const routes = [
  {
    path:"/",
    component:Home
  },
  {
    path:"/login",
    component:Login
  },
  {
    path:"/register",
    component:Register
  },
  {
    path:"/compatible",
    component:() => import("../views/Compatible.vue")
  }
]

//将创建的配置关系挂载到router实例上
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router